/*
 * Result View Mixin
 */
.query-result-view() {
  .result {
    border: 1px solid @theme-query-result-json-border-color;
    padding: 10px;
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
    border-radius: @border-radius-base;
    background: @theme-query-result-json-bg;
    &:hover {
      border: 1px solid lighten(@theme-query-result-json-border-color, 30%);
      .menu {
        top: -1px;
      }
    }
    .menu {
      .btn-hover-menu();
    }
  }
  pre {
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    color: @theme-query-result-json-color;
  }
}
.raw-view {
  .query-result-view();
}
.text-view {
  .query-result-view();
}
.key-value-view {
  .query-result-view();
  .top-header {
    .table-cell {
      padding: 2px 5px;
    }
  }
  .result {
    padding: 0;
    .result-header {
      cursor: pointer;
      padding: 2px 5px;
      .result-cell {
        &.first-cell {
          padding-left: 0;
        }
      }
    }
    .result-sub-header {
      cursor: pointer;
    }
    .result-cell {
      padding: 2px 5px;
      display: inline-block;
      i {
        margin-right: 2px;
        font-size: 12px;
      }
    }
    .result-body {
      height: 0;
      padding: 0;
      overflow: hidden;
      &.open {
        height: 100%;
      }
      .date {
        color: @theme-query-result-date-icon;
      }
      .string {
        color: @theme-query-result-string-icon;
      }
      .result-row {
        background: @theme-query-result-json-bg;

        // border-bottom: 1px solid lighten(@theme-query-result-json-border-color, 20%);
        &:nth-child(odd) {
          background: darken(@theme-query-result-json-bg, 4%);
        }
        &:hover {
          background: darken(@theme-query-result-json-bg, 4%);
        }
        &:last-child {
          border-bottom: none;
        }
      }
    }
  }
}
.table-view {
  .query-result-view();
  
  .result-row {
    background: @theme-query-result-json-bg;
    &:nth-child(even) {
      background: darken(@theme-query-result-json-bg, 4%);
    }
  }
  
  .result-cell {
    white-space: nowrap;
    max-width: 300px; 
    text-overflow: ellipsis; 
    overflow: hidden;
    border: 0;
  }

  .table th {
    border: 0;
  }
}
